function doloadBlob(data: any, filename: string) {
    const url = URL.createObjectURL(new Blob([data]));

    const a = document.createElement('a');

    a.href = url;
    a.download = filename;
    a.style.display = 'none';
    document.body.appendChild(a);
    a.click();
    document.body.removeChild(a);

    URL.revokeObjectURL(url);
}

export { doloadBlob };
